package com.maserb.monitor.dataCenter.communication;

import lombok.Data;

@Data
public class EigenValue {
    private String valueType;
    private EigenWarningStatusEnum warningStatusEnum;
    private float eigenValue;

    public static EigenValue convert(byte[] content, Box<Integer> index) {
        EigenValue p = new EigenValue();
        p.valueType = String.valueOf(ByteUtils.getInt(content, index));
        p.warningStatusEnum = EigenWarningStatusEnum.getIndex(ByteUtils.getInt(content, index));
        p.eigenValue = ByteUtils.getFloat(content, index);
        return p;
    }
}
